package com.icesoft.xsnow.common.security.dto;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * class_name: XSnowUser
 * package: com.icesoft.xsnow.oauth.dto
 * describe: 扩展用户信息
 * creat_user: xuefeng.gao
 * creat_date: 2019/5/14 0014 16:44
 **/

/**
 * @program: xsnow
 * @description:
 * @author: xuefeng.gao
 * @create: 2019-05-14 16:02
 **/
@Data
public class XSnowUser extends User {

    /**
     * 用户ID
     */
    private Integer id;
    /**
     * 租户ID,对应clientid
     */
    private String tenantId;
    /**
    * 电话
    **/
    private String phone;
    /**
    * Email
    **/
    private String email;

    public XSnowUser(Integer id,String username, String password, String tenantId, String phone, String email, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.id = id;
        this.phone=phone;
        this.email=email;
        this.tenantId=tenantId;
    }

}
